#include <iostream>
#include <vector>
class Test
{
public:
    Test()
    {
    }
    Test(const Test& t)
    {
        std::cout << "拷贝构造\n";
    }


    Test(Test &&t)//右值引用
    {
        std::cout << "移动构造函数\n";
    }
};

int main()
{
    Test t1;
    //std::move()能把左值变成右值
    Test t2 = std::move(t1);


    int b = 10;
    int &a = b;
    //右值引用
    int &&c = 10;
    

    std::vector<int> v = {1,2,3};
    std::vector<int> v2 = std::move(v);

    std::cout << v.size() << std::endl;
    std::cout << v2.size() << std::endl;
    return 0;
}